package com.ruoyi.vehicleDispatch.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.vehicleDispatch.mapper.CustomerServiceRuleMapper;
import com.ruoyi.vehicleDispatch.domain.CustomerServiceRule;
import com.ruoyi.vehicleDispatch.service.ICustomerServiceRuleService;

/**
 * 客服务司机规则Service业务层处理
 * 
 * @author niuyi
 * @date 2025-08-19
 */
@Service
public class CustomerServiceRuleServiceImpl implements ICustomerServiceRuleService 
{
    @Autowired
    private CustomerServiceRuleMapper customerServiceRuleMapper;

    /**
     * 查询客服务司机规则
     * 
     * @param ruleId 客服务司机规则主键
     * @return 客服务司机规则
     */
    @Override
    public CustomerServiceRule selectCustomerServiceRuleByRuleId(Integer ruleId)
    {
        return customerServiceRuleMapper.selectCustomerServiceRuleByRuleId(ruleId);
    }

    /**
     * 查询客服务司机规则列表
     * 
     * @param customerServiceRule 客服务司机规则
     * @return 客服务司机规则
     */
    @Override
    public List<CustomerServiceRule> selectCustomerServiceRuleList(CustomerServiceRule customerServiceRule)
    {
        return customerServiceRuleMapper.selectCustomerServiceRuleList(customerServiceRule);
    }

    /**
     * 新增客服务司机规则
     * 
     * @param customerServiceRule 客服务司机规则
     * @return 结果
     */
    @Override
    public int insertCustomerServiceRule(CustomerServiceRule customerServiceRule)
    {
        return customerServiceRuleMapper.insertCustomerServiceRule(customerServiceRule);
    }

    /**
     * 修改客服务司机规则
     * 
     * @param customerServiceRule 客服务司机规则
     * @return 结果
     */
    @Override
    public int updateCustomerServiceRule(CustomerServiceRule customerServiceRule)
    {
        return customerServiceRuleMapper.updateCustomerServiceRule(customerServiceRule);
    }

    /**
     * 批量删除客服务司机规则
     * 
     * @param ruleIds 需要删除的客服务司机规则主键
     * @return 结果
     */
    @Override
    public int deleteCustomerServiceRuleByRuleIds(Integer[] ruleIds)
    {
        return customerServiceRuleMapper.deleteCustomerServiceRuleByRuleIds(ruleIds);
    }

    /**
     * 删除客服务司机规则信息
     * 
     * @param ruleId 客服务司机规则主键
     * @return 结果
     */
    @Override
    public int deleteCustomerServiceRuleByRuleId(Integer ruleId)
    {
        return customerServiceRuleMapper.deleteCustomerServiceRuleByRuleId(ruleId);
    }
}
